<template>
  <div>
    <el-col :span="18">
      <el-card class="card-box">
        <div slot="header"><span class="title">待办事项</span><el-button style="float:right" type="text">全部</el-button></div>
        <el-table :data="todoItems" :show-header="false" height="200px" empty-text="无代办事项">
          <el-table-column width="50">
            <template slot-scope="{row}">
              {{ row.id }}
            </template>
          </el-table-column>
          <el-table-column align="center">
            <template slot-scope="{row}">
              {{ row.title }}
            </template>
          </el-table-column>
          <el-table-column width="100">
            <template slot-scope="scope">
              <el-button size="mini" type="text" @click="handlerTodo(scope.row)">处理</el-button>
            </template>
          </el-table-column>
        </el-table>
      </el-card>
    </el-col>
  </div>
</template>

<script>
export default {
  name: 'TodoItem',
  props: {
    todoSize: { type: Number, default: 10 }
  },
  data() {
    return {
      todoItems: [
        // { id: 1, title: 'name' },
        // { id: 2, title: 'name' },
        // { id: 3, title: 'name' },
        // { id: 4, title: 'name' }
      ]
    }
  },
  created() {
  },
  methods: {
    handlerTodo(row) {
      this.$router.push({ path: `/system/user/${row.id}` })
    }
  }
}
</script>

<style >
.el-table td{
   padding: 5px;
 }
</style>
